﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MagicBag.CRM.Model;
using MagicBag.CRM.IDAL;

namespace MagicBag.CRM.BLL
{
   public  class RoleBLL
    {
        //创建数据访问对象
        private static readonly IRole roleDAL = DALFactory.DataAccess.CreateRole();

        public int Insert(Role role)
        {
            return roleDAL.Insert(role);
        }

        public int Delete(int id)
        {
            return roleDAL.Delete(id);
        }

        public int Update(Role role)
        {
            return roleDAL.Update(role);
        }

        public Role GetRole(int id)
        {
            return roleDAL.GetRole(id);
        }

        public IList<Role> GetRoles()
        {
            return roleDAL.GetRoles();
        }
    }
}
